package swimming;
import redis.clients.jedis.Jedis;

public class Redis {
    public Jedis Redis(){
        Jedis jedis = new Jedis("127.0.0.1", 6379);
        System.out.println("Redis服务器连接成功！");
        //查看服务是否正在运行
        System.out.println("服务正在运行："+jedis.ping());

        return jedis;
    }

    public static void main(String[] args) {
        Redis j=new Redis();
        Jedis work=j.Redis();
        //System.out.println(work);
        work.set("2020081305","123456");
        work.set("2020081321","123456");
    }
}
